package com.flyduck.vueshop.order.h5.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.flyduck.vueshop.common.core.lang.Result;
import com.flyduck.vueshop.common.mybatis.base.BaseController;
import com.flyduck.vueshop.common.sotoken.annotation.Login;
import com.flyduck.vueshop.order.h5.service.H5OrderItemService;
import com.flyduck.vueshop.order.h5.vo.H5OrderItemRespVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * H5OrderItemController
 * </p>
 *
 * @author flyduck
 * @since 2024-07-23
 */
@RestController
@RequestMapping("/order/h5/orderItem")
public class H5OrderItemController extends BaseController {

    @Resource
    private H5OrderItemService h5OrderItemService;

    /**
     * 获取待评论的订单明细
     * @param status
     * @return
     */
    @Login
    @GetMapping("/getOrderItemPageByStatus")
    public Result<Page<H5OrderItemRespVO>> getOrderItemPageByStatus(Integer status){
        Page<H5OrderItemRespVO> h5OrderItemRespVOPage = h5OrderItemService.getOrderItemPageByStatus(getPage(),status);
        return Result.success(h5OrderItemRespVOPage);
    }
}
